﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <script src="js/jquery-1.7.2.min.js"></script>
    <script>
        $(function () {
            $.post("/Ashx/Select.ashx", { ParentID: 0 }, function (data) {
                for (var i = 0; i < data.length; i++) {
                    $("#Select1").append("<option value='" + data[i].CodeID + "'>" + data[i].Name + "</option>")
                }

            }, "json");
            $("#Select1").change(function () {
                var parentID = $(this).val();
                $("#Select2").empty();
                $.post("/Ashx/Select.ashx", { ParentID: parentID }, function (data) {
                    for (var i = 0; i < data.length; i++) {
                        $("#Select2").append("<option value='" + data[i].CodeID + "'>" + data[i].Name + "</option>")
                    }

                }, "json");
            });
            $("#Select2").change(function () {
                var parentID = $(this).val();
                $("#Select3").empty();
                $.post("/Ashx/Select.ashx", { ParentID: parentID }, function (data) {
                    for (var i = 0; i < data.length; i++) {
                        $("#Select3").append("<option value='" + data[i].CodeID + "'>" + data[i].Name + "</option>")
                    }

                }, "json");
            });
        })
    </script>
    <script type="text/javascript">
        window.onload = function () {
            var validateCode = document.getElementById("validateCode");
            validateCode.onclick = function () {
                document.getElementById("#imgCode").src = "ValidateImageCode.ashx?d=" + new Date().getMilliseconds();

            }

        }
    </script>
    <title></title>

</head>
<body>
    <select id="Select1">
    </select>省
    <select id="Select2">
    </select>市
    <select id="Select3">
    </select>区<br />
              <form method="post" action="UserLogin.ashx">
                          用户名:<input type="text" name="txtName" /><br />
                        密码:<input type="password" name="txtPwd" /><br />
                        验证码:<input type="text" name="txtCode" /><img src="ValidateImageCode.ashx" id="imgCode" />
                        <a href="javascript:void(0)" id="validateCode">看不清</a><br />
                        <input type="submit" value="登录" />
                
              </form>
</body>
</html>